Soak the salt cod in water for 48 hours, changing the water 5 or 6 times. Drain and press the cod to remove the excess water. Discard any skin or bones and shred the cod finely. Place the flaked cod in a large saucepan with the thyme and bay leaf, add water to cover, and bring to a boil. Reduce heat and simmer for 15 minutes. Drain, reserving the cooking liquid. Melt half the butter in a frying pan and cook the leeks, covered, over low heat until softened, about 15 minutes. Boil the potatoes for 20-25 minutes. Heat the olive oil in a skillet and add the garlic, salt cod, and the leeks. Season with pepper. Cook, stirring occasionally, for 5 minutes. Stir in 1/4 cup of the reserved cooking liquid and sprinkle with the chopped chervil. Dice the remaining butter and stir it into the cod. To serve, mash the potatoes and place on a serving platter. Pour the cod mixture over the potatoes.